package com.javaee.ex05.service;

import com.javaee.ex05.mapper.PublisherMapper;
import com.javaee.ex05.po.Publisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class PublisherService {
    @Autowired
    private PublisherMapper publisherMapper;
    public void findAllPublishers(){
        List<Publisher> publishers = publisherMapper.findAllPublisher();
        System.out.println("查找的到全部出版社信息如下：");
        for (Publisher publisher : publishers) {
            System.out.println(publisher);
        }
    }
}
